﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="cn.kgc.entity.Detail"%>
<%@page import="cn.kgc.service.impl.NewsServiceImpl"%>
<%@page import="cn.kgc.service.NewsService"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
	<head>
		<link href="<%=request.getContextPath() %>/css/common.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="<%=request.getContextPath() %>/ckeditor/ckeditor.js"> </script>
	</head>
<body>
<!-- 如果要获取参数需要通过param打点调用，没有为什么，这是规矩  -->
前台传过来的ID是 ${param.id}
<%
	NewsService service = new NewsServiceImpl();
	Detail detail = service.getNewsById(Integer.parseInt(request.getParameter("id")));
	//****************************
	//*将代码中的jsp小脚本全部换成el表达式**
	//****************************
	
	//将对象放入域中
	request.setAttribute("news",detail);
	
	
%>
<div class="main-content-right">
      
        <div class="main-text-box">
      		<div class="main-text-box-tbg">
                <div class="main-text-box-bbg">
                    <div class="article-box">
                    	<!--新闻的标题-->
                        <h1><%=detail.getTitle() %></h1>
                        <div class="source-bar">发布者：${news.author} 分类：新闻信息 更新时间：${news.createDate} </div>
                        <div class="article-content">
                            <span class="article-summary"><b>摘要：${news.summary}</b></span>
                            <img src="<%request.getContextPath();%>/upload/<%=detail.getPicPath()%>" alt="" />
                            <div>
                            ${news.content}
                            </div>
                         </div>
                    </div>
                </div>
            </div>
        </div>
        
    </div>
</body>
</html>